@use './var.css';
@use './FormCreate/index.scss';
@use './theme.scss';
@use 'element-plus/theme-chalk/dark/css-vars.css';

.reset-margin [class*='el-icon'] + span {
  margin-left: 2px !important;
}

// 解决抽屉弹出时，body宽度变化的问题
.el-popup-parent--hidden {
  width: 100% !important;
}

// 解决表格内容超过表格总宽度后，横向滚动条前端顶不到表格边缘的问题
.el-scrollbar__bar {
  display: flex;
  justify-content: flex-start;
}

/* nprogress 适配 element-plus 的主题色 */
#nprogress {
  & .bar {
    background-color: var(--el-color-primary) !important;
  }

  & .peg {
    box-shadow:
      0 0 10px var(--el-color-primary),
      0 0 5px var(--el-color-primary) !important;
  }

  & .spinner-icon {
    border-top-color: var(--el-color-primary);
    border-left-color: var(--el-color-primary);
  }
}

/** holly-captcha */
.holly-captcha {
  &.holly-warpper{
    padding: 12px 16px;
    background-color: var(--captcha-theme-bg-color);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-sizing: border-box;
  }

  &.holly-theme {
    border: 1px solid rgba(206, 223, 254, 0.5);
    border-color: var(--captcha-theme-border-color);

    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    border-radius: 8px;

    box-shadow: 0 0 20px rgba(100, 100, 100, 0.1);
    -webkit-box-shadow: 0 0 20px rgba(100, 100, 100, 0.1);
    -moz-box-shadow: 0 0 20px rgba(100, 100, 100, 0.1);
  }

  .holly-header {
    height: 36px;
    width: 100%;
    font-size: 15px;
    color: var(--captcha-theme-text-color);

    display:-webkit-box;
    display:-webkit-flex;
    display:-ms-flexbox;
    display:flex;
    -webkit-box-align:center;
    -webkit-align-items:center;
    -ms-flex-align:center;
    align-items: center;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    span {
      flex: 1;
      padding-right: 5px;
    }

    em {
      padding: 0 3px;
      font-weight: bold;
      color: var(--captcha-theme-active-color);
      font-style: normal;
    }
  }
  .holly-body {
    position: relative;
    width: 100%;
    margin-top: 10px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    background: var(--captcha-theme-body-bg-color);
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    overflow: hidden;
    .holly-body-inner {
      background: var(--captcha-theme-body-bg-color);
    }
  }

  .holly-picture{
    position: relative;
    z-index: 2;
    width: 100%;
  }

  .holly-loading{
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 68px;
    margin-left: -34px;
    margin-top: -34px;
    line-height: 68px;
    text-align: center;
    display: flex;
    align-content: center;
    justify-content: center;

    svg, circle {
      color: var(--captcha-theme-loading-icon-color);
      fill: var(--captcha-theme-loading-icon-color);
    }
  }

  .holly-footer{
    width: 100%;
    height: 50px;
    color: #34383e;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display:flex;
    align-items: center;
    padding-top: 10px;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    .icon-block {
      flex: 1;
    }
  }

  .holly-icon-block{
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display:flex;
    align-items: center;
    svg{
      color: var(--captcha-theme-icon-color);
      fill: var(--captcha-theme-icon-color);
      margin: 0 5px;
      cursor: pointer;
    }
  }

  .holly-button-block{
    width: 120px;
    height: 40px;

    button{
      width: 100%;
      height: 40px;
      //letter-spacing: 2px;
      text-align: center;
      padding: 9px 15px;
      font-size: 15px;
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
      display: inline-block;
      line-height: 1;
      white-space: nowrap;
      cursor: pointer;
      color: var(--captcha-theme-btn-color);
      background-color: var(--captcha-theme-btn-bg-color);
      border: 1px solid transparent;
      border-color: var(--captcha-theme-btn-bg-color);
      -webkit-appearance: none;
      box-sizing: border-box;
      outline: none;
      margin: 0;
      transition: .1s;
      font-weight: 500;
      -moz-user-select: none;
      -webkit-user-select: none;

      &.disabled {
        pointer-events: none;
        background-color: var(--captcha-theme-btn-disabled-color);
        border-color: var(--captcha-theme-btn-disabled-color);
      }
    }
  }

  .holly-drag-slide-bar {
    width: 100%;
    height: 100%;
    position: relative;
    touch-action: none;
  }

  .holly-drag-line{
    position: absolute;
    height: 14px;
    background-color: var(--captcha-theme-drag-bar-color);
    left: 0;
    right: 0;
    top: 50%;
    margin-top: -7px;
    -webkit-border-radius: 7px;
    -moz-border-radius: 7px;
    border-radius: 7px;
  }

  .holly-drag-block {
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -20px;
    width: 82px;
    height: 40px;
    z-index: 2;
    background-color: var(--captcha-theme-drag-bg-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    -webkit-border-radius: 24px;
    -moz-border-radius: 24px;
    border-radius: 24px;

    box-shadow: 0 0 20px rgba(100, 100, 100, 0.35);
    -webkit-box-shadow: 0 0 20px rgba(100, 100, 100, 0.35);
    -moz-box-shadow: 0 0 20px rgba(100, 100, 100, 0.35);

    color: var(--captcha-theme-drag-icon-color);
    fill: var(--captcha-theme-drag-icon-color);

    &.disabled {
      pointer-events: none;
      background-color: var(--captcha-theme-btn-disabled-color);
      border-color: var(--captcha-theme-btn-disabled-color);
    }
  }

  .holly-drag-block-inline {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}